home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1992 October / 1992-10.d64 / labasic demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  133 lines

  1. 10 ifla=0thenla=49152:print"[147]loading la basic and demo":load"la basic",8,1
  2. 20 sysla,0
  3. 30 sysla,2,"title"
  4. 40 sysla,2,"initialize
  5. 50 [158]la,2,"draw screen"
  6. 60 :
  7. 70 [143]=get options
  8. 80 [151]198,0:[146]198,1:[161]a$
  9. 90 [139]a$[179]"1"[176]a$[177]"4"[167][158]la,1,"get options"
  10. 100 a[178][197](a$):[158]la,2,op$(a)
  11. 110 [158]la,1,"get options
  12. 120 :
  13. 130 :
  14. 140 :
  15. 150 rem=press any key
  16. 160 sysla,4(22,9:print"press any key to go on"
  17. 170 poke198,0:wait198,1:return
  18. 180 :
  19. 190 :
  20. 200 :
  21. 210 rem=draw screen
  22. 220 poke53281,cs:poke53280,cb
  23. 230 sysla,3(5,5,cc:print"choose an option
  24. 240 [158]la,5,"data for screen
  25. 250 rem=ds loop
  26. 260 read x,y,a$
  27. 270 ifx=-1thensysla,1,"ds done"
  28. 280 sysla,4(x,y:printa$
  29. 290 sysla,1,"ds loop
  30. 300 [143]=ds done
  31. 310 [142]
  32. 320 :
  33. 330 [143]=data for screen
  34. 340 [131] 7,7,"1.zodiac
  35. 350 data 8,7,"2.change background color
  36. 360 [131] 9,7,"3.change border color
  37. 370 data10,7,"4.change text color
  38. 380 [131]-1,-1,-1
  39. 390 :
  40. 400 :
  41. 410 :
  42. 420 [143]=initialize
  43. 430 cc[178]101:[143]  character color
  44. 440 cb[178]0 :[143]  borer     color
  45. 450 cs[178]0 :[143]  screen    color
  46. 460 [158]la,5,"data for initialization
  47. 470 fora=1to4:readop$(a):next
  48. 480 fora=1to40:sp$=sp$+" ":next:sp$=sp$+"[145][145]"
  49. 490 return
  50. 500 :
  51. 510 rem=data for initialization
  52. 520 data "zodiac
  53. 530 [131] "background color
  54. 540 data "border color
  55. 550 [131] "text color
  56. 560 :
  57. 570 :
  58. 580 rem=background color
  59. 590 cb=cb+1:ifcb>255thencb=0
  60. 600 poke53281,cb
  61. 610 return
  62. 620 :
  63. 630 :
  64. 640 :
  65. 650 rem=border color
  66. 660 cs=cs+1:ifcb>255 thencb=0
  67. 670 poke53280,cs
  68. 680 return
  69. 690 :
  70. 700 :
  71. 710 :
  72. 720 rem=text color
  73. 730 cc=cc+1:if cc>116thencc=100
  74. 740 sysla,4(0,0,cc
  75. 750 return
  76. 760 :
  77. 770 :
  78. 780 :
  79. 790 rem=zodiac
  80. 800 poke53280,0:poke53281,0
  81. 810 sysla,3(5,14,2:print"the zodiac
  82. 820 [158]la,4(9,2,1:[153]"in which month were you born (1-12) ?
  83. 830 sysla,4(10,1,2:printsp$:inputmo$:mo=val(mo$)
  84. 840 ifmo<1ormo>12then830
  85. 850 sysla,4(12,2,1:print"on what date ?
  86. 860 [158]la,4(13,1,2:[153]sp$  :[133]da$:da[178][197](da$)
  87. 870 [139]da[179]1[176]da[177]31[167]860
  88. 880 [139]da[179]10 [167]da$[178]"0"[170]da$
  89. 890 zz$[178]mo$[170]"."[170]da$:zz[178][197](zz$)
  90. 900 [139]zz[177]12.20    [167]zz[178]zz[171]13
  91. 910 [158]la,5,"dates of zodiac"
  92. 920 zc[178]0
  93. 930 zc[178]zc[170]1:[135] a:[139]zz[177]a[167]930
  94. 940 [158]la,5,"stars of zodiac"
  95. 950 [129]a[178]1[164]zc:[135] zs$:[130]
  96. 960 [158]la,4(17,3,1:[153]"your zodiac sign is...."
  97. 970 [158]la,4(17,25,2:[153]zs$
  98. 980 [158]la,2,"press any key"
  99. 990 [158]la,2,"draw screen"
  100. 1000 [142]
  101. 1010 :
  102. 1020 [143]=dates of zodiac
  103. 1030 [131]1.19,2.18,3.20,4.20,5.20,6.20,7.20,8.21,9.22,10.22,11.22,12.20
  104. 1040 :
  105. 1050 [143]=stars of zodiac
  106. 1060 [131] "capricon","aquarius","pisces",aries,taurus,"gemini","cancer","leo"
  107. 1070 [131] "virgo","libra","scorpio","sagittarius"
  108. 1080 [142]
  109. 1090 :
  110. 1100 :
  111. 1110 :
  112. 1120 [143]=title
  113. 1130 [151]53280,0 :[151]53281,0:[158]la,3(0,12,1:[153]"l a b a s i c
  114. 1140 sysla,5,"data for title
  115. 1150 [143]=again
  116. 1160 [135] x,y,a$
  117. 1170 [139]x[178][171]1[167][158]la,1,"back
  118. 1180 sysla,4(x,y:printa$
  119. 1190 sysla,1,"again
  120. 1200 [143]=back
  121. 1210 [158]la,2,"press any key":[142]
  122. 1220 :
  123. 1230 [143]=data for title
  124. 1240 [131] 2,10 ,"a basic extension"
  125. 1250 [131]6,1,"that allows the use of labels in the"
  126. 1260 [131]7,1,"following statements:
  127. 1270 data10,3,"goto"
  128. 1280 data11,3,"gosub"
  129. 1290 data12,3,"restore"
  130. 1300 data15,1,"it also provides commands for
  131. 1310 [131]16,1,"cursor positioning & color setting
  132. 1320 data-1,-1,-1
  133.